.TH LINUX-RUN-HOOKS 1 "3 May 2025"
.SH NAME
linux\-run\-hooks \- run package installation or removal hooks

.SH SYNOPSIS
\fBlinux\-run\-hooks image\fB \fIMAINT\-SCRIPT KERNEL\-VER IMAGE\-PATH\fR
                \fB--\fR \fIMAINT\-PARAMS\fR ...
.PP
\fBlinux\-run\-hooks headers\fB \fIMAINT\-SCRIPT KERNEL\-VER\fR
                \fB--\fR \fIMAINT\-PARAMS\fR ...
.SH DESCRPTION
\fBlinux\-run\-hooks\fR is intended to be called from the maintainer
scripts of Linux kernel image and headers packages.  It uses the
\fBrun-parts\fR command to execute hooks installed in the appropriate
subdirectories of \fB/etc/kernel\fR and \fB/usr/share/kernel\fR.
.PP
Each maintainer script in a kernel image package should call this
command with its script type as the first argument.  The postinst
script in a headers package should call it with \fBheaders_postinst\fR
as the first argument.
.PP
The \fIMAINT\-SCRIPT\fR argument must be the name of the maintainer
script: \fBpreinst\fR, \fBpostinst\fR, \fBprerm\fR, or \fBpostrm\fR.
.PP
The \fIKERNEL\-VER\fR argument must be the kernel version string as
shown by \fBuname \-r\fR and used in filenames, not the package
version.
.PP
The \fIIMAGE\-PATH\fR argument must be the absolute filename of the
kernel image.
.PP
The \fIMAINT-PARAMS\fR arguments must be the parameters received by
the maintainer script.
.SH AUTHOR
\fBlinux\-run\-hooks\fR and this manual page were written by Ben
Hutchings as part of the Debian \fBlinux\-base\fR package.
